
//第一个Node 服务器
const http = require("http")
const port = 2114
const hostname = "localhost"
//requert 请求
//reponse 响应

const server =http.createServer((request,response)=>{

console.log(request.url)
response.writeHead(200,{'content-Type':'text/html;charset=utf8'})
response.write("<h2>this第一个Node 服务器</h2>")
response.end()
})
server.listen(port,hostname,()=>{
   console.log("server is successful");
})